using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_FeeSubjectMap : EntityTypeConfiguration<FMS_FeeSubject>
	{
		public FMS_FeeSubjectMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.Code)
				.HasMaxLength(50);
				
			this.Property(t => t.Name)
				.HasMaxLength(50);
				
			this.Property(t => t.MeasureUnit)
				.HasMaxLength(10);
				
			this.Property(t => t.Description)
				.HasMaxLength(200);
				
			// Table & Column Mappings
			this.ToTable("FMS_FeeSubject");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.PID).HasColumnName("PID");
			this.Property(t => t.Code).HasColumnName("Code");
			this.Property(t => t.Name).HasColumnName("Name");
			this.Property(t => t.WarnAmount).HasColumnName("WarnAmount");
			this.Property(t => t.IsForceWarn).HasColumnName("IsForceWarn");
			this.Property(t => t.Budget).HasColumnName("Budget");
			this.Property(t => t.MeasureUnit).HasColumnName("MeasureUnit");
			this.Property(t => t.IsSecret).HasColumnName("IsSecret");
			this.Property(t => t.IsLeaf).HasColumnName("IsLeaf");
			this.Property(t => t.IsAssistAccounts).HasColumnName("IsAssistAccounts");
			this.Property(t => t.Description).HasColumnName("Description");
			this.Property(t => t.CreateUser).HasColumnName("CreateUser");
			this.Property(t => t.UpdateUser).HasColumnName("UpdateUser");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.CreateDeptId).HasColumnName("CreateDeptId");
			this.Property(t => t.UpdateDeptId).HasColumnName("UpdateDeptId");
			this.Property(t => t.StatAccounting).HasColumnName("StatAccounting");
			this.Property(t => t.SubjectLevel).HasColumnName("SubjectLevel");
			this.Property(t => t.IsMonthLimit).HasColumnName("IsMonthLimit");
		}
	}
}

